//
//  PassengerEditVC.m
//  desktop
//
//  Created by David Hamrick on 4/7/10.
//  Copyright 2010 Hamrick Software. All rights reserved.
//

#import "PassengerEditVC.h"


@implementation PassengerEditVC

@synthesize passenger;

-(void)awakeFromNib
{
	[_nameField setStringValue:[passenger name]];
	[_addressField setStringValue:[passenger address]];
	[_phoneField setStringValue:[passenger phone]];
}	

- (IBAction)cancelPressed:(id)sender
{
	[self close];
}

- (IBAction)okPressed:(id)sender
{
	[passenger setName:[_nameField stringValue]];
	[passenger setAddress:[_addressField stringValue]];
	[passenger setPhone:[_phoneField stringValue]];
	[passenger save];
	[self close];
}

- (IBAction)deleteButtonPressed:(id)sender
{
	[passenger delete];
	[self close];
}

@end
